<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

	<h:head>
	<title>Aggiungi Impiegato</title>
</h:head>
	<body>
		<h:form id="addemploy">
		
		<p:panel header="Aggiungi Impiegato">
		
		<h:panelGrid columns="3" id="regGrid">
				<h:outputLabel for="nome">Nome:</h:outputLabel>
		<p:inputText id="nome" value="#{addemploybean.impiegato.nome}"/>
			<p:message for="nome" />
			
				<h:outputLabel for="cognome">Cognome:</h:outputLabel>
		<p:inputText id="cognome" value="#{addemploybean.impiegato.cognome}"/>
			<p:message for="cognome" />
			
				<h:outputLabel for="mail">Email:</h:outputLabel>
		<p:inputText id="mail" value="#{addemploybean.impiegato.email}"/>
			<p:message for="mail" />
		
				<h:outputLabel for="password">Password:</h:outputLabel>
		<p:password id="password" value="#{addemploybean.impiegato.password}"
					feedback="true" match="pwd2" label="Password"/>
						<p:message for="password" />
						
				<h:outputLabel for="pwd2">Conferma Password:</h:outputLabel>
		<p:password id="pwd2" label="Confirm Password" value="#{addemploybean.impiegato.password}"/>
		
			
				<p:message for="pwd2" />
							</h:panelGrid>
				
		<p:commandButton value="Register"
				action="#{addemploybean.register()}" />
		<p:messages autoUpdate="true"></p:messages>
		</p:panel>
		
		
		
		</h:form>
		
	</body>
</html>